#!/bin/sh

APP_PATH=/Users/yangwu3/Downloads/aliyun-driver/
APP_MAIN=webdav-aliyundriver

#echo "updating $APP_MAIN code ..."
#git reset --hard
#git pull

echo "maven building ..."
mvn clean package -Dmaven.test.skip=true

#echo "cp service sync-api to /etc/init.d ..."
#cp sync-api /etc/init.d

echo "cp $APP_MAIN.jar ..."
\cp -r target/$APP_MAIN.jar $APP_PATH/

sh run.sh restart
echo "restart $APP_MAIN success..."
